require 'pathname'
=begin
puts Pathname.new(__FILE__).realpath
puts Dir.pwd
puts File.dirname(__FILE__)
puts File.expand_path("..",Dir.pwd)
puts File.expand_path(".",Dir.pwd)
puts __FILE__
puts File.expand_path('../.')
=end

def getfiles(path)
    files = Dir.entries path
    files.each do |f|
        #puts Dir.pwd+f
        if File::directory?(f) then
            #puts "|D| "+f
        else
            puts "wget http://192.168.1.108/down/"+f
        end
    end
end
getfiles('/home/yonh/workspace/php/down/' )
getfiles('/home/yonh/workspace/php/down/m' )
